<template>
  <div class="sample-components">
    <a-card title="Button - 按钮" :bordered="false">
      <a slot="extra" target="_blank" href="http://rest-doc.easy-frame.top/front-end/components/general.html">文档地址</a>
      <p>
        我们将常用的按钮（新增、删除、修改等）封装成公用的组件，以保持在不同模块中按钮形式保持一致。
      </p>
      <a-row>
        <a-col :lg="12">
          <h3>常规按钮</h3>
          <p>一般放到表格右上角</p>
          <h4>EBtnAdd 新增</h4>
          <p>打开新增页面</p>
          <div class="btn-group">
            <e-btn-add to="/sys/sample/input"/>
            <!-- 自定义按钮文字 -->
            <e-btn-add to="/sys/sample/input">自定义文字</e-btn-add>
          </div>
          <h4>EBtnRemoveBatch 删除</h4>
          <p>批量删除数据</p>
          <div class="btn-group">
            <e-btn-remove-batch :ids="[1]" />
            <!-- 自定义按钮文字 -->
            <e-btn-remove-batch :ids="[1]" >自定义文字</e-btn-remove-batch>
          </div>
          <h4>EBtnSave 保存</h4>
          <p>表单填写页面底部的保存</p>
          <div class="btn-group">
            <e-btn-save/>
            <!-- 自定义按钮文字 -->
            <e-btn-save>自定义文字</e-btn-save>
          </div>
          <h4>EBtnImport 导入</h4>
          <p>通过Excel导入数据，点击打开导入页面</p>
          <div class="btn-group">
            <e-btn-import import-code="xxx"/>
            <!-- 自定义按钮文字 -->
            <e-btn-import import-code="xxx">自定义文字</e-btn-import>
          </div>
        </a-col>
        <a-col :lg="12">
          <h3>表格操作列按钮</h3>
          <p>一般用于表格最后一列的操作列中。</p>
          <h4>EBtnAddSub 新增下级</h4>
          <p>打开新增页面并指定一个上级id</p>
          <e-btn-add-sub to="/sys/sample/input" :params="{id: 'xxx'}"/>
          <h4>EBtnEdit 修改</h4>
          <p>打开修改页面</p>
          <e-btn-edit to="/sys/sample/input"/>
          <h4>EBtnInfo 查看</h4>
          <p>打开查看页面</p>
          <e-btn-info to="/sys/sample/info"/>
          <h4>EBtnRemove 删除</h4>
          <p>删除一条数据</p>
          <e-btn-remove/>
          <h4>EBtnWorkFlowStart 发起流程</h4>
          <e-btn-work-flow-start
            model-key="sample"
            business-key="xxx"
            business-title="工作名称"
            business-details-path="views/sample/work-flow/Info"/>
          <h4>EBtnWorkFlowProgress 审核进度</h4>
          <e-btn-work-flow-progress business-key="xxx"/>
          <h4>EBtnWorkFlowRevoke 撤销申请</h4>
          <e-btn-work-flow-revoke business-key="xxx"/>
        </a-col>
      </a-row>
    </a-card>
  </div>
</template>

<script>
import EBtnAdd from '@/components/Easy/general/BtnAdd'
import EBtnRemove from '@/components/Easy/general/BtnRemove'
import EBtnRemoveBatch from '@/components/Easy/general/BtnRemoveBatch'
import EBtnSave from '@/components/Easy/general/BtnSave'
import EBtnImport from '@/components/Easy/general/BtnImport'
import EBtnAddSub from '@/components/Easy/general/BtnAddSub'
import EBtnEdit from '@/components/Easy/general/BtnEdit'
import EBtnInfo from '@/components/Easy/general/BtnInfo'
import EBtnWorkFlowStart from '@/components/Easy/general/work-flow/BtnStart'
import EBtnWorkFlowProgress from '@/components/Easy/general/work-flow/BtnProgress'
import EBtnWorkFlowRevoke from '@/components/Easy/general/work-flow/BtnRevoke'
export default {
name: 'SampleComponentsGeneralButton',
  components: { EBtnWorkFlowRevoke, EBtnWorkFlowProgress, EBtnWorkFlowStart, EBtnInfo, EBtnEdit, EBtnAddSub, EBtnImport, EBtnSave, EBtnRemoveBatch, EBtnRemove, EBtnAdd }
}
</script>

<style scoped>

</style>
